package com.ruoyi.program.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 章节管理对象 wx_chapter
 *
 * @author ruoyi
 * @date 2025-10-02
 */
public class WxChapter extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 章节id */
    private Long chapterId;

    /** 题库id */
    @Excel(name = "题库id")
    private Long bankId;

    /** 章节名称 */
    @Excel(name = "章节名称")
    private String chapterName;

    /** 父章节id */
    @Excel(name = "父章节id")
    private Long parentId;

    /** 章节顺序 */
    @Excel(name = "章节顺序")
    private Long sort;

    /** 章节描述 */
    @Excel(name = "章节描述")
    private String description;

    /** 创建人id */
    @Excel(name = "创建人id")
    private Long userId;

    /** 菜单状态（0正常 1停用） */
    @Excel(name = "菜单状态", readConverterExp = "0=正常,1=停用")
    private String status;

    private List<WxChapter> children = new ArrayList<>();

    private List<WxLearningMaterial> materials = new ArrayList<>();

    public List<WxLearningMaterial> getMaterials() {
        return materials;
    }

    public void setMaterials(List<WxLearningMaterial> materials) {
        this.materials = materials;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<WxChapter> getChildren() {
        return children;
    }

    public void setChildren(List<WxChapter> children) {
        this.children = children;
    }

    public void setChapterId(Long chapterId)
    {
        this.chapterId = chapterId;
    }

    public Long getChapterId()
    {
        return chapterId;
    }

    public void setBankId(Long bankId)
    {
        this.bankId = bankId;
    }

    public Long getBankId()
    {
        return bankId;
    }

    public void setChapterName(String chapterName)
    {
        this.chapterName = chapterName;
    }

    public String getChapterName()
    {
        return chapterName;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setSort(Long sort)
    {
        this.sort = sort;
    }

    public Long getSort()
    {
        return sort;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    @Override
    public String toString() {
        return "WxChapter{" +
                "chapterId=" + chapterId +
                ", bankId=" + bankId +
                ", chapterName='" + chapterName + '\'' +
                ", parentId=" + parentId +
                ", sort=" + sort +
                ", description='" + description + '\'' +
                ", userId=" + userId +
                ", children=" + children +
                '}';
    }
}
